Developer Documentation

QuickTime 4 API Documentation

3D Graphics Programming with QuickDraw 3D 1.5.4

Previous | QD3D Book | Overview | Chapter Contents | Next |

Handling Viewer Events

The final thing you need to do to support the 3D Viewer is to modify your main event loop so that events in the viewer controller strip and in the viewer pane can be handled. You need to add a line like this to your event loop:

isViewerEvent = Q3ViewerEvent(myViewer, myEvent);

The Q3ViewerEvent function determines whether the event specified by the myEvent event record affects the specified viewer object. If so, Q3ViewerEvent handles the event and returns TRUE as it function result. Otherwise, Q3ViewerEvent returns FALSE .

Your application should also call the Q3AdjustCursor function during idle-time processing to ensure that the 3D Viewer has an opportunity to update the cursor. If your application calls SetCursor to change the cursor while the 3D Viewer is active, it needs to call the Q3ViewerCursorChanged function immediately after it calls SetCursor , to inform the 3D Viewer that the cursor has changed shape.

The functions Q3AdjustCursor and Q3ViewerCursorChanged are available only in versions 1.1 and later of the 3D Viewer.


© 1997 Apple Computer, Inc.

Previous | QD3D Book | Overview | Chapter Contents | Next |